package org.blogsite.greencode.dao;

import java.util.List;

import org.blogsite.greencode.bean.SystemBulletinBoard;
import org.blogsite.greencode.bean.User;

import sun.net.www.content.text.plain;

public interface SystemDAO {
	/*注册保存用户信息*/
	public void save(User user);
	/*验证注册信息是否正确*/
	public boolean checkRegisterInfo(String name,String job_num);
	/*验证用户名是否可用*/
	public boolean checkUsername(String username);
	/*验证登录*/
	public User checkLogin(User user);
	/*当登录验证成功,修改最后登录与最后IP*/
	public void updateLastDateAndIP(User user);
	/*查询用户个人信息*/
	public User searchPersonInformation(String userName);
	/*添加公告板信息*/
	public void addBulletinBoard(SystemBulletinBoard systemBulletinBoard);
	/*修改用户密码*/
	public void modifyPassword(User user);
	/*返回用户对象*/
	public User getUser(String name);
	/*jasypt开源项目为密码加密,*/
	public String encryptPassword(String password);
	/*jasypt检查密码合法性*/
	public boolean checkPassword(String plainPassword,String encryptedPassword);
	/*显示所有公告*/
	public List displayAllBulletin();
	/*查询公告*/
	public void deleteBulletin(SystemBulletinBoard sysBoard);
	/*显示公告详细内容*/
	public SystemBulletinBoard showDetailBulletinBoard(int id);
}
